home *** CD-ROM | disk | FTP | other *** search
File List | 1994-03-26 | 5.8 KB | 199 lines |
- Motorola DSP56000 Assembler Version 3.1 94-03-26 17:38:39 spy.asm Page 1
-
-
-
- 1 ;******************************************************
- *********
- 2 ;* SPY.ASM -- Simple oscilloscope with SPY
- *
- 3 ;*
- *
- 4 ;* Displays Left channel on the SPY program.
- *
- 5 ;*
- *
- 6 ;* Copyright (C) 1994 by Alef Null. All rights reserved
- . *
- 7 ;* Author(s): Jarkko Vuori, OH2LNS
- *
- 8 ;* Modification(s):
- *
- 9 ;******************************************************
- *********
- 10
- 11
- 223
- 224
- 225 000010 buflen equ 16 ; l
- enght of sample buffer
- 226
- 227 ; flags
- 228 000003 spyflg equ 3 ; s
- py on/off
- 229
- 230
- 231 P:0040 org p:user_code
- 232
- 233 P:0040 67F400 move #buffer+2,r7
- 000042
- 234 P:0042 053FA7 move #buflen*4-1,m7
- 235
- 236 P:0043 62F400 move #buffer,r2
- 000040
- 237 P:0045 3A0300 move #4-1,n2
- 238 P:0046 053FA2 move #buflen*4-1,m2
- 239
- 240 ctrlcd 1,r2,buflen,LINEI,0.0,0.0,LINEO|HEADP
- ,0.0,0.0
- 261 opencd 8
- 290
- 291 ; wait for one complete block
- 292 loop waitblk r2,buflen,1
- 310
- 311 ; copy left channel to the both outputs
- 312 P:0063 56DA00 move x:(r2)+,a
- 313 P:0064 5E5A00 move a,y:(r2)+
- 314 P:0065 5E5A00 move a,y:(r2)+
- 315 P:0066 205A00 move (r2)+
- 316
- 317 ; and to the spy
- 318 P:0067 0D0069 jsr <spy
- 319
- 320 P:0068 0C0055 jmp <loop
- 321
- 322
- 323 ; *** special spy ***
- 324 P:0069 0A18A3 spy jset #spyflg,x:<flag,_spyon
- Motorola DSP56000 Assembler Version 3.1 94-03-26 17:38:39 spy.asm Page 2
-
-
-
- 00007C
- 325
- 326 lookc ; c
- heck if spy operation requested
- 328 P:006C 0E8095 jcs <_spyend
- 329 P:006D 56F400 move #>'S',a
- 000053
- 330 P:006F 200045 cmp x0,a
- 331 P:0070 0E2095 jne <_spyend
- 332
- 333 P:0071 44F400 move #>'P',x0 ; y
- es, send first a preamble
- 000050
- 334 putc
- 336 P:0074 54F400 move #>512,a1
- 000200
- 337 P:0076 541900 move a1,x:<spyn
- 338 P:0077 54F400 move #>1,a1
- 000001
- 339 P:0079 541A00 move a1,x:<spym
- 340 P:007A 0A1823 bset #spyflg,x:<flag
- 341 P:007B 0C0095 jmp <_spyend
- 342
- 343 ; spy is active, send a register to the host
- 344 P:007C 579A00 _spyon move x:<spym,b
- 345 P:007D 47F400 move #>1,y1
- 000001
- 346 P:007F 47F47C sub y1,b #>1,y1
- 000001
- 347 P:0081 571A00 move b,x:<spym
- 348 P:0082 0E2095 jne <_spyend
- 349 P:0083 471A00 move y1,x:<spym
- 350
- 351 P:0084 21C600 move a,y0 ; L
- SB first
- 352 P:0085 0608A0 rep #8
- 353 P:0086 200023 lsr a
- 354 P:0087 218400 move a1,x0
- 355 putc
- 357
- 358 P:0089 20CE00 move y0,a ; t
- hen HSB
- 359 P:008A 0610A0 rep #16
- 360 P:008B 200023 lsr a
- 361 P:008C 218400 move a1,x0
- 362 putc
- 364
- 365 P:008E 569900 move x:<spyn,a ; c
- heck if all samples allready given
- 366 P:008F 44F400 move #>1,x0
- 000001
- 367 P:0091 200044 sub x0,a
- 368 P:0092 561900 move a,x:<spyn
- 369 P:0093 0E2095 jne <_spyend
- 370 P:0094 0A1803 bclr #spyflg,x:<flag
- 371
- 372 P:0095 00000C _spyend rts
- 373
- 374
- 375
- 376 X:0018 org x:user_data
- 377
- Motorola DSP56000 Assembler Version 3.1 94-03-26 17:38:39 spy.asm Page 3
-
-
-
- 378 X:0018 flag dc 0
- 379 X:0019 spyn ds 1
- 380 X:001A spym ds 1
- 381
- 382 X:0040 buffer dsm buflen*4
- 383
- 384
- 385 Y:0018 org y:user_data
- 386
- 387 Y:0040 dsm buflen*4
- 388
- 389
- 390 end
-
- 0 Errors
- 0 Warnings
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-